package com.sqn.controller;

import com.sqn.service.AsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * description: 异步处理
 *
 * @author sqn
 * @version 1.0
 * @date 2021/5/31 0031 上午 11:17
 */
@RestController
public class AsyncController {

    @Autowired
    AsyncService asyncService;

    /**
     * description: 异步处理
     *
     * @return: java.lang.String
     * @author sqn
     * @date: 2021/5/31 0031 上午 11:31
     */
    @RequestMapping({"/", "/async"})
    public String async() {
        asyncService.asyncTask();
        return "success";
    }
}
